package com.chinacoal.microservice.fallback;

import com.chinacoal.microservice.TenantManagementClient;
import com.chinacoal.microservice.pojo.CcmsSmartleasingTenant;
import com.chinacoal.microservice.util.CodeMsg;
import com.chinacoal.microservice.util.QueryCriteria;
import com.chinacoal.microservice.util.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 运维模块-租户管理-异常回退类
 * @date 2020-11-18 14：33
 */
@Component
public class TenantManagementClientFallback implements TenantManagementClient {

    /**
     * @Description: 查询所有的租户信息（带分页）,异常回退
     * @author zhuliang
     * @date 2020/11/18 14:40
     */
    @Override
    public Result<List<CcmsSmartleasingTenant>> getAllTenant(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据租户id查询对应的租户信息,常用回退
     * @author zhuliang
     * @date 2020/11/18 17:14
     */
    @Override
    public Result<CcmsSmartleasingTenant> getTenantById(String pkTenantId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 修改租户信息，异常回退
     * @author zhuliang
     * @date 2020/11/18 17:19
     */
    @Override
    public Result updateTenant(CcmsSmartleasingTenant tenant, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 批量删除租户信息，异常回退
     * @author zhuliang
     * @date 2020/11/18 17:27
     */
    @Override
    public Result deleteTenant(String deleteId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 条件查询租户信息（带分页）
     * @author zhuliang
     * @date 2020/11/18 17:42
     */
    @Override
    public Result<List<CcmsSmartleasingTenant>> getAllTenantByCondition(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 重置租户密码
     * @author zhuliang
     * @date 2021/1/7 18:58
     */
    @Override
    public Result resetPassword(String pkTenantId, String contactPhone, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }
}
